<?php

use falcon5\inc\Http\Controllers\CacheController;
use falcon5\inc\Http\Controllers\GatewayController;
use falcon5\inc\Http\Controllers\LoggerController;
use falcon5\inc\Http\Controllers\SettingsController;

return [
    'logger' => [
        'controller' => LoggerController::class,
        'routes' => [
            'save_log' => [
                'method' => 'saveLog',
                'public' => true, // 是否允许未登录用户访问
            ],
        ],
    ],
    'entry' => [
        'controller' => GatewayController::class,
        'routes' => [
            'save_entry' => [
                'method' => 'saveEntry',
                'public' => true, // 是否允许未登录用户访问
            ],
            'entry_list' => [
                'method' => 'entryList',
                'public' => true,
            ],
            'translate_url' => [
                'method' => 'translateUrl',
                'public' => true,
            ],
        ],
    ],
    'auth' => [
        'controller' => GatewayController::class,
        'routes' => [
            'validate_key' => [
                'method' => 'validateKey',
                'public' => true,
            ],
        ],
    ],
    'site' => [
        'controller' => CacheController::class,
        'routes' => [
            'cache_list' => [
                'method' => 'list',
                'public' => true,
            ],
            'lock_page' => [
                'method' => 'lockPage',
                'public' => true,
            ],
            'unlock_page' => [
                'method' => 'unlockPage',
                'public' => true,
            ],
        ],
    ],
    'settings' => [
        'controller' => SettingsController::class,
        'routes' => [
            'get_settings' => [
                'method' => 'getSettings',
                'public' => true,
            ],
            'save_settings' => [
                'method' => 'saveSettings',
                'public' => false,
            ],
            'get_cache_directory' => [
                'method' => 'getCacheDirectory',
                'public' => false,
            ],
            'validate_domain' => [
                'method' => 'validateDomain',
                'public' => false,
            ],
        ],
    ],
]; 